set(LLVM_Utils_DIR ${LLVM_MAIN_SRC_DIR}/lib/Transforms/Utils)


add_llvm_component_library(LLVMBuddyTransformUtils
  ${LLVM_Utils_DIR}/AddDiscriminators.cpp
  ${LLVM_Utils_DIR}/AMDGPUEmitPrintf.cpp
  ${LLVM_Utils_DIR}/ASanStackFrameLayout.cpp
  ${LLVM_Utils_DIR}/AssumeBundleBuilder.cpp
  ${LLVM_Utils_DIR}/BasicBlockUtils.cpp
  ${LLVM_Utils_DIR}/BreakCriticalEdges.cpp
  ${LLVM_Utils_DIR}/BuildLibCalls.cpp
  ${LLVM_Utils_DIR}/BypassSlowDivision.cpp
  ${LLVM_Utils_DIR}/CallPromotionUtils.cpp
  ${LLVM_Utils_DIR}/CallGraphUpdater.cpp
  ${LLVM_Utils_DIR}/CanonicalizeAliases.cpp
  ${LLVM_Utils_DIR}/CanonicalizeFreezeInLoops.cpp
  ${LLVM_Utils_DIR}/CloneFunction.cpp
  ${LLVM_Utils_DIR}/CloneModule.cpp
  ${LLVM_Utils_DIR}/CodeExtractor.cpp
  ${LLVM_Utils_DIR}/CodeLayout.cpp
  ${LLVM_Utils_DIR}/CodeMoverUtils.cpp
  ${LLVM_Utils_DIR}/CtorUtils.cpp
  ${LLVM_Utils_DIR}/CountVisits.cpp
  ${LLVM_Utils_DIR}/Debugify.cpp
  ${LLVM_Utils_DIR}/DemoteRegToStack.cpp
  ${LLVM_Utils_DIR}/EntryExitInstrumenter.cpp
  ${LLVM_Utils_DIR}/EscapeEnumerator.cpp
  ${LLVM_Utils_DIR}/Evaluator.cpp
  ${LLVM_Utils_DIR}/FixIrreducible.cpp
  ${LLVM_Utils_DIR}/FlattenCFG.cpp
  ${LLVM_Utils_DIR}/FunctionComparator.cpp
  ${LLVM_Utils_DIR}/FunctionImportUtils.cpp
  ${LLVM_Utils_DIR}/GlobalStatus.cpp
  ${LLVM_Utils_DIR}/GuardUtils.cpp
  ${LLVM_Utils_DIR}/HelloWorld.cpp
  ${LLVM_Utils_DIR}/InlineFunction.cpp
  ${LLVM_Utils_DIR}/InjectTLIMappings.cpp
  ${LLVM_Utils_DIR}/InstructionNamer.cpp
  ${LLVM_Utils_DIR}/IntegerDivision.cpp
  ${LLVM_Utils_DIR}/LCSSA.cpp
  ${LLVM_Utils_DIR}/LibCallsShrinkWrap.cpp
  ${LLVM_Utils_DIR}/Local.cpp
  ${LLVM_Utils_DIR}/LoopPeel.cpp
  ${LLVM_Utils_DIR}/LoopRotationUtils.cpp
  ${LLVM_Utils_DIR}/LoopSimplify.cpp
  ${LLVM_Utils_DIR}/LoopUnroll.cpp
  ${LLVM_Utils_DIR}/LoopUnrollAndJam.cpp
  ${LLVM_Utils_DIR}/LoopUnrollRuntime.cpp
  ${LLVM_Utils_DIR}/LoopUtils.cpp
  ${LLVM_Utils_DIR}/LoopVersioning.cpp
  ${LLVM_Utils_DIR}/LowerAtomic.cpp
  ${LLVM_Utils_DIR}/LowerGlobalDtors.cpp
  ${LLVM_Utils_DIR}/LowerIFunc.cpp
  ${LLVM_Utils_DIR}/LowerInvoke.cpp
  ${LLVM_Utils_DIR}/LowerMemIntrinsics.cpp
  ${LLVM_Utils_DIR}/LowerSwitch.cpp
  ${LLVM_Utils_DIR}/MatrixUtils.cpp
  ${LLVM_Utils_DIR}/MemoryOpRemark.cpp
  ${LLVM_Utils_DIR}/MemoryTaggingSupport.cpp
  ${LLVM_Utils_DIR}/Mem2Reg.cpp
  ${LLVM_Utils_DIR}/MetaRenamer.cpp
  ${LLVM_Utils_DIR}/MisExpect.cpp
  ${LLVM_Utils_DIR}/ModuleUtils.cpp
  ${LLVM_Utils_DIR}/MoveAutoInit.cpp
  ${LLVM_Utils_DIR}/NameAnonGlobals.cpp
  ${LLVM_Utils_DIR}/PredicateInfo.cpp
  ${LLVM_Utils_DIR}/PromoteMemoryToRegister.cpp
  ${LLVM_Utils_DIR}/RelLookupTableConverter.cpp
  ${LLVM_Utils_DIR}/ScalarEvolutionExpander.cpp
  ${LLVM_Utils_DIR}/SCCPSolver.cpp
  ${LLVM_Utils_DIR}/StripGCRelocates.cpp
  ${LLVM_Utils_DIR}/SSAUpdater.cpp
  ${LLVM_Utils_DIR}/SSAUpdaterBulk.cpp
  ${LLVM_Utils_DIR}/SampleProfileInference.cpp
  ${LLVM_Utils_DIR}/SampleProfileLoaderBaseUtil.cpp
  ${LLVM_Utils_DIR}/SanitizerStats.cpp
  ${LLVM_Utils_DIR}/SimplifyCFG.cpp
  ${LLVM_Utils_DIR}/SimplifyIndVar.cpp
  ${LLVM_Utils_DIR}/SimplifyLibCalls.cpp
  ${LLVM_Utils_DIR}/SizeOpts.cpp
  ${LLVM_Utils_DIR}/SplitModule.cpp
  ${LLVM_Utils_DIR}/StripNonLineTableDebugInfo.cpp
  ${LLVM_Utils_DIR}/SymbolRewriter.cpp
  ${LLVM_Utils_DIR}/UnifyFunctionExitNodes.cpp
  ${LLVM_Utils_DIR}/UnifyLoopExits.cpp
  ${LLVM_Utils_DIR}/Utils.cpp
  ${LLVM_Utils_DIR}/ValueMapper.cpp
  ${LLVM_Utils_DIR}/VNCoercion.cpp

  ADDITIONAL_HEADER_DIRS
  ${LLVM_MAIN_INCLUDE_DIR}/llvm/Transforms
  ${LLVM_MAIN_INCLUDE_DIR}/llvm/Transforms/Utils

  DEPENDS
  buddy_intrinsics_gen

  LINK_COMPONENTS
  BuddyAnalysis
  BuddyCore
  Support
  TargetParser
  )
